home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
010a
/
ps_bios.zip
/
SET_TYPE.ASM
< prev
Wrap
Assembly Source File
|
1991-04-21
|
5KB
|
101 lines
;-----------------------------------------------------------------------------
; SET_TYPE.COM V1.1
;
; SET_TYPE - Utility to modify AT hard disk parameters for drive D: so that
; the system can handle the Compaq Deskpro (8086 or 80286) 30
; megabyte hard disk, though it can be modified to install the
; parameters for any hard disk.
;
; ABSTRACT - Builds the parameter table as specified in the IBM-PC/AT
; Tech Ref Manual, BIOS listing section, all the way in the back,
; and then installs the table as if it were the interrupt vector
; for interrupt 46 (41 if for drive C:)
;
; Modification History:
;
; 5/6/86 - Initial release, version 1.0
; 5/7/86 - Modified to add code to make disk parameter
; changes permanent on controller V1.1
;
; To modify for your purposes, change the table values to fit your drive and
; change the "mov al,46h" to "mov al,41h" if you want modify the table for
; drive C:. Also, modify the line that reads "mov dl,81h" to mov dl,80h" for
; use on drive C:. This will enable you to perform a low level format with the
; enclosed program ATDIAG.ARC, a substitute for the IBM AT Diagnostics.
;
; Note that you must first SETUP a drive type with the real diagnostics so
; that the computer will pass POST. Use the type number that is closest to
; your drive's parameters. If you can't find one that is the same, use a type
; that specifies a number of heads and cylinders (tracks) LOWER than what your
; drive has. Then run the properly modified copy of this program to modify the
; table to modify the parameters to match.
;
; To prepare: MASM set_type,,,;
; LINK set_type,,,;
; EXE2BIN set_type.exe set_type.com
; ERASE set_type.exe
;
; ...then put SET_TYPE on yout AUTOEXEC.BAT file so that the parameters are
; modified everytime you boot.
;
; Once you have done the low-level format with ATDIAG, run FDISK, set the
; partition, run FORMAT to format the disk, and VOILA.... you now have a
; true-blue "weird disk" all formatted and ready to load up.
;
; I HAVE NOT tried this to prepare a system disk, only my second drive...
; If you get it to work for that purpose, let me know...
;
; Juan Jimenez
; President
; Micro Consulting Associates
; P.O. Box 4296
; Newport Beach, Ca. 92661-4296
;
; This program is hereby released into the Public Domain. You may use it as
; you see fit. No donations are requested. Use it, and if you find you like
; it and it helps you, let me know!!
;-----------------------------------------------------------------------------
code segment para
assume cs:code,ds:code
org 100h ; Make it a .COM file
set_type proc far
jmp init ; Go do your thing...
;---------------------------------------------------------------------
; The new drive parameter table. This is for a Seagate ST-251 42 meg
; unformatted drive. Modify to suit.... MAKE SURE YOUR PARAMETERS ARE
; RIGHT! In case of doubt, call the manufacturer.
;
; Be very careful that you get the # of cyls right. If it is wrong you
; MAY crash your drive if you try to access a non-existent cyl that is
; too high above the max physical cyl of your drive.
;---------------------------------------------------------------------
drive: dw 0820d ; Max # of cyls
db 6 ; heads
dw 0 ; Not used
dw 0821d ; Starting Write-pre-comp cyl
db 0 ; Not used
db 0 ; Control byte - Refer to AT Tech Ref
db 0 ; Not used
db 0 ; Not used
db 0 ; Not used
dw 0820d ; Landing zone (or park track...)
db 017d ; Sectors per track - never changes!
db 0 ; Reserved for future use (says IBM...)
theend: db 0 ; End of table (dummy byte)
init: mov ax,cs ; Get the code segment of this routine...
mov ds,ax ; ...into DS for the INT 21 call
mov dx,offset drive ; Set offset to the drive info table
mov ah,25h ; Function call 25h to set int vector 46...
mov al,46h ; ...for drive D: (Change to 41h for C:)
int 21h ; Change the vector
mov ah,09h ; Reset the controller parameters
mov dl,81h ; Thru INT 13, function 9
int 13h ; Do it...
mov dx,offset theend ; Mark the end of the table
int 27h ; Exit but leave the table resident
set_type endp ; That's all, folks! (Simple, isn't it)
code ends
end set_type